﻿@using System.Data;
@model DTcms.Model.BaseModel
<div class="header">
    <div class="head-top">
        <div class="section">
            <div class="left-box">
                <span>网站链接：</span>
                <a target="_blank" href="http://www.dtcms.net">动力启航官网</a>
                <a target="_blank" href="http://demo.dtcms.net">DTcms演示站</a>
            </div>
            <div id="menu" class="right-box">
                @if (Model.userModel == null)
                {
                    <a href="@Html.linkurl("register")">注册</a><strong>|</strong>
                    <a href="@Html.linkurl("login")">登录</a>
                }
                else
                {
                    <a id="loginout" href="javascript:;">退出</a><strong>|</strong>
                    <a href="@Html.linkurl("usercenter","index")">会员中心</a>
                }
                <a href="@Html.linkurl("content","contact")"><i class="iconfont icon-phone"></i>联系我们</a>
                <a href="@Html.linkurl("cart")"><i class="iconfont icon-cart"></i>购物车(<span id="shoppingCartCount"><script type="text/javascript" src="/api/submit_ajax/view_cart_count"></script></span>)</a>
            </div>
        </div>
    </div>
    <div class="head-nav">
        <div class="section">
            <div class="logo">
                <a href="@Html.linkurl("index")"><img src="@Model.templateskin/images/logo.png" /></a>
            </div>
            <div class="nav-box">
                <ul>
                    @{ 
                        DataTable MainMenu = Html.get_plugin_method("DTcms.Web.Plugin.Menu", "menu", "get_menu_list", 1, 0);
                        foreach (DataRow dr in MainMenu.Rows)
                        {
                            <li class="@dr["css_txt"]"><a href="@dr["link_url"]" target="@dr["target"]" title="@dr["title"]">@dr["title"]</a></li>
                        }
                    }
                </ul>
            </div>
            <div class="search-box">
                <div class="input-box">
                    <input id="keywords" name="keywords" type="text" onkeydown="if(event.keyCode==13){SiteSearch('@Html.linkurl("search")', '#keywords');return false};" placeholder="输入关健字" x-webkit-speech="" />
                </div>
                <a href="javascript:;" onclick="SiteSearch('@Html.linkurl("search")', '#keywords');">
                    <i class="iconfont icon-search"></i>
                </a>
            </div>
        </div>
    </div>
</div>